#ifndef ENROLLWINDOW_H
#define ENROLLWINDOW_H

#include <QWidget>
#include"Socket/TCPSocket.h"
namespace Ui {
class enrollwindow;
}

class enrollwindow : public QWidget
{
    Q_OBJECT

public:
    static enrollwindow *getinstance(){
        if(myenrollwindow==nullptr)
            myenrollwindow=new enrollwindow();
        return myenrollwindow;


    }
    explicit enrollwindow(QWidget *parent = nullptr);
    ~enrollwindow();
void GetTCPsocket(TCPSocket *socket);
private slots:

    void on_enroll_clicked();
    void getVerificationCode(QString code);
    void on_send_clicked();
    void SuccessAndgetMyId(QString id);
signals:
    void  sendphone(QString phone);
    void sendcode(QString code);
    void sendUseInfo(QString phonenum,QString usename,QString password,QString code);
private:
    Ui::enrollwindow *ui;
   TCPSocket *mysocket;
   static enrollwindow *myenrollwindow;
   QString code="";
};

#endif // ENROLLWINDOW_H
